home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 API Bible / Windows 95 API Bible 3 Disc Set.iso / Win32 API Bible Book 1 of 3 / CHAPTE21 / EX1.C next >
C/C++ Source or Header  |  1995-05-29  |  754b  |  25 lines

  1. #include <genstub.c>
  2.  
  3. LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  4. {
  5.    switch (uMsg)
  6.    {
  7.          case WM_COMMAND:
  8.                switch ( LOWORD( wParam ) )
  9.                {
  10.                   case IDM_TEST:  // Display command line.
  11.                         MessageBox( hWnd, GetCommandLine(), "Command Line", MB_OK );
  12.                         break;
  13.                   case IDM_EXIT:
  14.                         DestroyWindow( hWnd );
  15.                         break;
  16.                }
  17.                break;
  18.          case WM_DESTROY:
  19.                PostQuitMessage( 0 );
  20.                break;
  21.          default:
  22.                return (DefWindowProc(hWnd, uMsg, wParam, lParam));
  23.     }
  24.     return (NULL);
  25. }